<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
    <title>滚轮实验</title>

    <script src="../js/iscroll.js"></script>

    <style>
        body, * {
            margin: 0;
            padding: 0;
        }

        body {
            width: 100%;
            height: 100%;
        }

        #wrapper ul li{
            width: 100%;
            height: 50px;
            text-align: center;
        }
        #wrapper{
            margin-top: 100px;
            height: 300px;
            overflow: hidden;
        }
    </style>
</head>
<body>

<div id="wrapper">
    <ul>
        <li>0</li>
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
        <li>5</li>
        <li>6</li>
        <li>7</li>
        <li>8</li>
        <li>9</li>
        <li>10</li>
        <li>11</li>
    </ul>

</div>

</body>

<script>
    var myScroll;

    var isCroll=function (data) {
        myScroll = new IScroll('#wrapper',{
            vScroll:false,
            snap:true,
            hScrollbar:false,
            fadeScrollbars:true
        });
        pageData(data);
    }

    var pageData=function (obj) {
      $('body').html(obj);
      myScroll.refresh();
    };

    isCroll("<div>pagedata</div>");
</script>
</html>